//
//  TempViewController.swift
//  Weobo
//
//  Created by 史亚洲 on 16/1/19.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

class TempViewController: UIViewController {
    
    @objc private func push() {
        let temp = TempViewController()
    
    navigationController?.pushViewController(temp, animated: true)
    
    }
  
    

    override func viewDidLoad() {
        super.viewDidLoad()
        
        //注意:手写代码的控制器的颜色为clear,会出现卡顿现象,需要修改为白色
        view.backgroundColor = UIColor.whiteColor()
        title="\(navigationController?.childViewControllers.count ?? 0) 个控制器"
       
        navigationItem.rightBarButtonItem=UIBarButtonItem(title: "push", style: .Plain, target: self, action: "push")
        

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
